import request from '@/utils/request'

// 查询数据抓取列表
export function listCrawling(query) {
  return request({
    url: '/crm/crawling/list',
    method: 'get',
    params: query
  })
}

// 查询数据抓取详细
export function getCrawling(id) {
  return request({
    url: '/crm/crawling/' + id,
    method: 'get'
  })
}

// 新增数据抓取
export function addCrawling(data) {
  return request({
    url: '/crm/crawling',
    method: 'post',
    data: data
  })
}

// 修改数据抓取
export function updateCrawling(data) {
  return request({
    url: '/crm/crawling',
    method: 'put',
    data: data
  })
}

// 删除数据抓取
export function delCrawling(id) {
  return request({
    url: '/crm/crawling/' + id,
    method: 'delete'
  })
}

// 导出数据抓取
export function exportCrawling(query) {
  return request({
    url: '/crm/crawling/export',
    method: 'get',
    params: query
  })
}